#region using
using Microsoft.Xna.Framework;
using AwesomeTanks.Sources.Media;
#endregion


namespace AwesomeTanks.Sources.GameElements.TankElements
{

    /// <summary>
    /// The model of a Tank Turret in AwesomeTanks
    /// </summary>
    public class Turret : Sprite
    {
        #region Fields
        public const float TURRET_LAYER_DEPTH = 0f;

        public Vector2 CurrentAiming { get; set; }
        #endregion

        #region Constructors
        /// <summary>
        /// Initializes a new instance of the <see cref="Turret"/> class.
        /// </summary>
        /// <param name="position">The position.</param>
        public Turret(Vector2 position)
            : base (Art.SpriteSheet, Art.TurretSourceRectangle, position)
        {
            this.LayerDepth = TURRET_LAYER_DEPTH;
            this.CurrentAiming = new Vector2(0, -1);
            this.Origin = new Vector2(Art.TurretOrigin.X, Art.TurretOrigin.Y);
        }
        #endregion

        #region Update and Draw
        /// <summary>
        /// Update the Turret Component with her new position.
        /// </summary>
        /// <param name="newPosition">The new position.</param>
        public void Update(Vector2 newPosition)
        {
            this.Position = newPosition;
        }
        #endregion
    }
}
